package org.example.events.hostable.harassment;

import org.example.item.ball.Ball;
import org.example.models.interfaces.Action;
import org.example.person.Person;

import java.util.List;

public class AudienceHarassmentActions {
    public static Action<Person> joinAsParticipant(HarassmentEvent event, List<Ball> balls) {
        return person -> {
            if(!event.isStarted()) return;
            event.addParticipant(new HarassmentEvent.Participant(person, balls));
        };
    }

    public static Action<Person> joinAsWatcher(HarassmentEvent event) {
        return person -> {
            if(!event.isStarted()) return;
            event.addWatcher(person);
        };
    }


}
